//
//  UITableViewCell+UITableViewCell_selectAnimation.m
//  自动补全的textfield
//
//  Created by wsj2015 on 16/5/24.
//  Copyright © 2016年 wsj2015. All rights reserved.
//

#import "UITableViewCell+UITableViewCell_selectAnimation.h"

@implementation UITableViewCell (UITableViewCell_selectAnimation)


-(void)selectAnimationwithWidth:(CGFloat)wdith height:(CGFloat)height{
    UIView *tmpView         = [[UIView alloc] initWithFrame:CGRectMake(0, 0,wdith , height)];
    tmpView.backgroundColor = [[UIColor yellowColor] colorWithAlphaComponent:0.30];
    tmpView.alpha           = 0.f;
    
    [self addSubview:tmpView];
    
    [UIView animateWithDuration:0.20 delay:0 options:UIViewAnimationOptionCurveEaseIn animations:^{
        
        tmpView.alpha = 0.8f;
        
    } completion:^(BOOL finished) {
        
        [UIView animateWithDuration:0.20 delay:0.1 options:UIViewAnimationOptionCurveEaseOut animations:^{
            
            tmpView.alpha = 0.f;
            
        } completion:^(BOOL finished) {
            
            [tmpView removeFromSuperview];
        }];
    }];

 
}

@end
